write-yaml
Write YAML. Converts JSON to YAML writes it to the specified file.
Install
Install with npm
$ npm i write-yaml --save
Usage
var yaml = require('write-yaml');
var data = {language: 'node_js', node_js: ['0.10', '0.11']};
async
yaml('.travis.yml', data, function(err) {
if (err) console.log(err);
});
sync
yaml.sync('.travis.yml', data);
result
Both result in a .travis.yml
file with the following contents:
language: node_js
node_js:
- "0.10"
- "0.11"
Other data utils
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert
Released under the MIT license.
This file was generated by verb-cli on November 17, 2015.